package com.zhj.edu.exception.notify.observer.impl;

import com.zhj.edu.constance.Constance;
import com.zhj.edu.exception.notify.observer.base.Observer;
import com.zhj.edu.manager.SmsManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Slf4j
public class SmsObserver implements Observer {

    @Resource
    private SmsManager smsManager;

    @Override
    public void notifyMessage(String msg) {
        log.info("短信通知...");
        smsManager.sendSms(Constance.getOperatorTelPhone(),"");
    }
}
